<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" %>
    <%@ taglib uri="/struts-tags"  prefix="s"%>
    <%request.setCharacterEncoding("utf-8");%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head >
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<title>搜索页面</title>
		<style type="text/css">
			.i-pic.limit {margin:5px;border: 1px #e8e8e8 solid;overflow: hidden;position: relative;cursor: pointer;width:275px; height:300px}
			.picture{width:275px; height:200px}
		</style>
		<link href="AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css" />

		<link href="basic/css/demo.css" rel="stylesheet" type="text/css" />

		<link href="../css/seastyle.css" rel="stylesheet" type="text/css" />

		<script type="text/javascript" src="basic/js/jquery-1.7.min.js"></script>
		<script type="text/javascript" src="js/script.js"></script>
		<style type="text/css">
			.i-pic.limit {margin:5px;border: 1px #e8e8e8 solid;overflow: hidden;position: relative;cursor: pointer;width:275px; height:300px}
			.picture{width:275px; height:200px}
		</style>
	</head>

	<body>

		<jsp:include page="main_top.jsp"></jsp:include>
				<div class="am-g am-g-fixed">
					<div class="am-u-sm-12 am-u-md-12">
	                  	<div class="theme-popover">														
							<div class="search-content">
								<!-- 搜索结果 -->
								<br/><br/>
								<s:if test="#session.pageBean.list.size()==0">
									<br/><br/><br/><br/><br/><br/><br/><br/><br/>
									<center>您搜索的商品不存在！</center>
									<br/><br/><br/><br/><br/><br/><br/><br/><br/>
								</s:if>
								<s:else>
									<ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes">
										<s:iterator value="#session.pageBean.list">													
											<li>
												<a href="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId=<s:property value="objId"/>">
												<div class="i-pic limit">
													<img src="<s:property value="picture_one"/>" />										
													<p class="title fl"><s:property value="furnitureName"/></p>
													<p class="number fl">
													市场价：￥<span><s:property value="marketPrice"/></span></p>
													<p class="price fl">
													<b>销售价：￥</b>
													<strong><s:property value="salePrice"/></strong>
													</p>
												</div>
												</a>
											</li>
												
											</s:iterator>
										</ul>
									</s:else>
								</div>
							<!-- 搜索结果 -->
							</div>
							<div class="clear"></div>
				<!--分页 -->
				<input type="hidden" id="categ" name="category.id" value="<s:property value="#session.category.id"/>">
			<table border="0" cellspacing="0" cellpadding="0" width="900px">
				<tr>
					<td align="right">
						<span> 第<s:property value="#session.pageBean.pageIndex" />/<s:property value="#session.pageBean.pageSize" />页
						</span> <span> 总记录数：<s:property value="#session.pageBean.count" /> 每页显示:<s:property value="#session.pageBean.pageCount" /></span> <span> <s:if test="#session.pageBean.pageIndex != 1">
								<input type="button" value="首页" class="btn" onclick="Page(1)" />
								<input type="button" value="上一页" class="btn" onclick="Page(<s:property value="#session.pageBean.pageIndex-1"/>)" />
							</s:if> <s:if test="#session.pageBean.pageIndex != #session.pageBean.pageSize">
								<input type="button" value="下一页" class="btn" onclick="Page(<s:property value="#session.pageBean.pageIndex+1"/>)" />
								<input type="button" value="尾页" class="btn" onclick="Page(<s:property value="#session.pageBean.pageSize"/>)" />
							</s:if>
					</span>
					</td>
				</tr>
			</table>

						</div>
					</div>
		<jsp:include page="main_foot.jsp"></jsp:include>

	</div>

		<jsp:include page="main_right.jsp"></jsp:include>
	<script type="text/javascript">
		function clickProdect(id){
			window.location="FurnitureInfo_findFurnitureInfo.action?furnitureInfo.objId="+id;
	}
		function Page(pageindex) {
			
			var val=document.getElementById("search").value;
			var caid=document.getElementById("categ").value;
			window.location="FurnitureInfo_searchingByKeyMapToCustomer.action?pageIndex="+pageindex+"&keyword="+encodeURI(encodeURI(val))+"&category.id="+caid;
			}
</script>
	</body>

</html>